package com.ruoyi.system.api.factory;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.system.api.MailServerClient;
import com.ruoyi.system.api.RemoteFileService;
import com.ruoyi.system.api.domain.MailSendLog;
import com.ruoyi.system.api.domain.SysFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.web.multipart.MultipartFile;

/**
 * @
 */
public class MailServerClientFallbackFactory implements FallbackFactory<MailServerClient> {
    private static final Logger log = LoggerFactory.getLogger(MailServerClientFallbackFactory.class);

    @Override
    public MailServerClient create(Throwable throwable) {
        return new MailServerClient() {
            @Override
            public AjaxResult edit(MailSendLog mailSendLog) {
                return AjaxResult.error(throwable.getMessage());
            }

            @Override
            public AjaxResult add(MailSendLog mailSendLog) {
                return AjaxResult.error(throwable.getMessage());
            }

            @Override
            public TableDataInfo list(Integer status) {
                return null;
            }
        };
    }
}
